[XEN][POWERPC] Flush all of text per CPU in case the loader did not
authorJimi Xenidis <jimix@watson.ibm.com>
Mon, 2 Oct 2006 15:06:10 +0000 (11:06 -0400)
committerJimi Xenidis <jimix@watson.ibm.com>
Mon, 2 Oct 2006 15:06:10 +0000 (11:06 -0400)
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
--HG--
extra : transplant_source : %85%C4%82%F3%0A%0A%B7%E9%D8s%031%E7%7C%9E%20-%8E%A6%B1

xen/arch/powerpc/powerpc64/exceptions.S

index 78ab31fb29199491c68d2215b50acce27d646f1e..224568bfc1e4aa3287f3b15301ed2734b9bac9c9 100644 (file)
@@ -564,6 +564,18 @@ _GLOBAL(sleep)
  */    
     .globl spin_start
 spin_start:
+
+    /* Do a cache flush for our text, in case the loader didn't */
+    LOADADDR(r9, _start)
+    LOADADDR(r8, _etext)
+4:  dcbf r0,r9
+    icbi r0,r9
+    addi r9,r9,0x20            /* up to a 4 way set per line */
+    cmpld cr0,r9,r8
+    blt        4b
+    sync
+    isync
+
     /* Write our processor number as an acknowledgment that we're alive.  */
     LOADADDR(r14, __spin_ack)
     stw r3, 0(r14)